<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDownloadCountsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('download_counts', function (Blueprint $table) {
            $table->comment = '渠道下载统计表';
            $table->increments('id');
            $table->ipAddress('ip')->comment('用户ip');
            $table->string('source_id')->comment('渠道id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('download_counts');
    }
}
